/*!
\copyright  Copyright (c) 2022 Qualcomm Technologies International, Ltd.
            All Rights Reserved.
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\version    
\file       google_finder.h
\brief      Header file for the component handling Google Finder Core functionality.
*/

#ifndef GOOGLE_FINDER_H_
#define GOOGLE_FINDER_H_

#ifdef INCLUDE_GOOGLE_FINDER
#include <task_list.h>
#include "google_finder_private.h"

/*! \brief Google Finder Initialization.
 */
bool GoogleFinder_Init(Task init_task);

/*! \brief Get pointer to Google Finder task data structure.
    \param void
    \return googleFinderTaskData pointer to Google Finder task data structure
*/
googleFinderTaskData *googleFinder_GetTaskData(void);

/*! \brief Get the Ephemeral Identity Key stored by the Provider
    \param None
    \return Pointer to 32 byte EIK, should be freed by the caller.
*/
uint8 *googleFinder_GetEIK(void);

/*! \brief Check if the finder location tracking is disabled or not.
    \param void
    \return TRUE if location tracking is disabled, FALSE otherwise.
 */
bool GoogleFinder_IsLocationTrackingDisabled(void);

/*! \brief Kick start the beacon time counter, time is updated every second.
    \param none
    \return none
*/
void GoogleFinder_KickBeaconTimeCounter(void);

/*! \brief Run beacon time counter on peer earbud once EIK is written to primary earbud.

    \param void 
    \return void
*/
void GoogleFinder_SyncBeaconTime(void);

/*! \brief Handler function to sync unwanted tracking protection mode to peer earbud.

    \param sync data
    \return void
*/
void GoogleFinder_SyncUnwantedTracking(bool is_unwanted_tracking_prot_mode);

/*! \brief Handler function to get the unwanted tracking protection mode.

    \param void
    \return bool TRUE if unwanted tracking protection mode is set, FALSE otherwise.
*/
bool GoogleFinder_IsUnwantedTrackingProtModeEnabled(void);

/*! \brief Google Finder Sync Initialization

    \param void
    \return void
 */
void GoogleFinder_SyncInit(void);

/*! \brief Public API to send the currently advertised EID and clock value to the connected seekers.
    \param seeker_number Seeker Index to send the data to.
    \return None
 */
void GoogleFinder_SendEIDAndClockValue(uint8 seeker_number);

/*! \brief Get persisted beacon time counter value stored in PS.
    \param none
    \return uint32 Beacon Time Counter value
*/
uint32 GoogleFinder_GetBeaconTimeCounter(void);

/*! \brief Persist beacon time counter when device shuts down
    \param void
    \return void
 */
void GoogleFinder_PersistBeaconTimeCounter(uint32 beacon_time_counter);
#endif /* INCLUDE_GOOGLE_FINDER */

#endif /* GOOGLE_FINDER_H_ */
